#ifndef SELECTIONTOOL_H
#define SELECTIONTOOL_H
#include "AbstractTool.h"
#include <QPolygon>


class SelectionTool : public AbstractTool
{

  Q_OBJECT

private:

  QPolygon _mouseDragRegion;
  bool _isInAction;



  virtual void _canvasMousePressedEvent (QPoint loc, QMouseEvent * event);
  virtual void _canvasMouseReleasedEvent (QPoint loc, QMouseEvent * event);
  virtual void _canvasMouseMovedEvent (QPoint loc, QMouseEvent * event);
  virtual void _canvasPaintingEvent (QPainter & painter);



//   virtual void _globalKeyPressedEvent( QKeyEvent * event );



  void _startSelection (const QPoint & point);
  void _changeSelection (const QPoint & point);
  void _finishSelection ();

public:

  SelectionTool (QWidget * parent);
  ~SelectionTool ();

};

#endif // SELECTIONTOOL_H
